//
//  main.m
//  jiexi
//
//  Created by mac on 16-5-17.
//  Copyright (c) 2016年 31231. All rights reserved.
//

#import <Foundation/Foundation.h>

int main(int argc, const char * argv[])
{

    @autoreleasepool {
        
        // insert code here...
        NSLog(@"Hello, World!");
        NSString *path=@"/Users/mac/Documents/3-15.txt";
        NSError *err;
        NSString *str=[[NSString alloc]initWithContentsOfFile:path encoding:NSUTF8StringEncoding error:&err];
        NSArray *arr=[str componentsSeparatedByString:@""];
        NSString *line=str;
        NSString *last=[line lastPathComponent];
        NSLog(@"%@",last);
    }
    return 0;
}

